import { createVNode } from "./vnode"

// render
export function createAppAPI(render) {
    return function createApp(rootComponent) {
        return {
            mount(rootContainer) {
                // 获取虚拟节点
                const vnode = createVNode(rootComponent)
                // 经过patch虚拟节点对比，最后挂在到容器上
                render(vnode,rootContainer)
            }
        }
    }
}


